import { defineStore } from 'pinia';
export const interfaceMgmtStore = defineStore('interfaceMgmt', {
  state: () => {
    //state 用来存储全局状态
    return {
      count: 1,
      treeData: [
        {
          title: '企业信息',
          key: '0',
          children: [
            {
              title: '企业工商信息',
              key: '00',
              children: [],
            },
            {
              title: '企业司法信息',
              key: '01',
              children: [],
            },
          ],
        },
        {
          title: '测试信息',
          key: '1',
          children: [
            {
              title: '测试1',
              key: '11',
              children: [],
            },
          ],
        },
      ],
      table_clumns: [
        {
          title: '接口名称',
          dataIndex: 'name',
        },
        {
          title: '接口描述',
          dataIndex: 'describe',
        },
        {
          title: '接口分类',
          dataIndex: 'classified',
        },
        {
          title: '接口来源',
          dataIndex: 'source',
        },
        {
          title: 'API状态',
          dataIndex: 'status',
        },
        {
          title: '更新时间',
          dataIndex: 'time',
        },
        {
          title: '操作',
          dataIndex: 'operation',
        },
      ],
      table_data: [
        {
          key: 1,
          name: 'John Brown',
          describe: 32,
          classified: 'New York ',
          source: '',
          status: 0,
          time: '',
          action: 1111111,
        },
        {
          key: 2,
          name: 'John Brown',
          describe: 32,
          classified: 'New York ',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 3,
          name: 'John Brown',
          describe: 32,
          classified: 'New York ',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 4,
          name: 'John Brown',
          describe: 32,
          classified: 'New York ',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 5,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 6,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
        {
          key: 7,
          name: 'John Brown',
          describe: 32,
          classified: 'New York',
          source: '',
          status: 0,
          time: '',
          action: 1,
        },
      ],
    };
  },
  getters: {
    //getters 就是用来封装计算属性，它有缓存的功能
  },
  actions: {
    //actions 就是用来封装业务逻辑，修改 state
  },
});
